<template>
  <div class="">
    <h1 class="title">{{ msg.tit }}</h1>
    <ul class="ul-img">
      <li class="li-img" v-for="(item, index) in myynum" :key="index">
        <img :src="require('@/assets/yjx/' + item)" alt="" />
      </li>
    </ul>
    <div class="yexx">
      <span>共23条</span>
      <span>当前页数2/3</span>
      <span><a href="javascript:void(0)">首页</a></span>
      <span><a href="javascript:void(0)">前一页</a></span>
      <span>123</span>
      <span><a href="javascript:void(0)">后一页</a></span>
      <span>尾页</span>
    </div>
  </div>
</template>
 
<script>
export default {
  name: "vueName",
  data() {
    return {
      msg: [],
      myynum: [], //每一页的数量
    };
  },
  created() {
    this.$http.get("/gywm/tupain").then((res) => {
      console.log(res.data.gctp[0]);
      this.msg = res.data.gctp[0];
      this.one(0);
    });
  },
  methods: {
    one(index) {
      this.myynum = this.msg.Image.slice(index, 9);
      console.log(this.myynum);
    },
  },
};
</script>
 
<style scoped lang = "scss">
.title {
  background: #142b57;
  color: white;
  padding-left: 48px;
  font-weight: normal;
  /* font-family: \9ed1\4f53; */
  line-height: 50px;
  margin-top: 40px;
}
.ul-img {
  display: flex;
  flex-wrap: wrap;
  .li-img {
    width: 310px;
    height: 200px;
    padding-left: 30px;
    margin-top: 20px;
    img {
      width: 310px;
      height: 200px;
    }
  }
}
.yexx{
  padding: 15px;
  text-align: center;
}
</style>